package com.dragon.mmochat.model.enumType;

import com.dragon.mmochat.MmochatConstant;

//法宝类型
//注：一旦发版,如果此enum会存到数据库，则此类型只能增加,不能减少或修改名字
public enum MmochatSuperMachineType implements MmochatCommonObjectType {
	神行法宝(1, MmochatConstant.BMP_PROP_67, 11),
	
	武魂(2, MmochatConstant.BMP_MATERIAL_10, 7);

	int value;
	int bmpId; // 包裹中图片
	int gridId; // 装备位置

	MmochatSuperMachineType(int value, int bmpId, int gridId) {
		this.value = value;
		this.bmpId = bmpId;
		this.gridId = gridId;
	}

	public int getBmpId() {
		return bmpId;
	}

	public int getGridId() {
		return gridId;
	}

	public int getValue() {
		return value;
	}

	public static MmochatSuperMachineType get(int v) {
		for (MmochatSuperMachineType type : MmochatSuperMachineType.values()) {
			if (type.getValue() == v) {
				return type;
			}
		}
		return null;
	}

}
